Plot3D is a plug-in module for pro Fit 5.0. It provides commands for generating 3D-plots from data and functions. Source code included.
Requirements
To run Plot3D, you need the PowerMac version of pro Fit 5.0 or later. If you don't have pro Fit 5.0, you can download a fully working trial version from
<http://www.chwerwell.com/cherwell/>
Furthermore, you need a Power Macintosh and Quickdraw 3D. Quickdraw 3D is a 3D-graphing package from apple. It can be downloaded for free from Apple's internet sites, such as
<http://quickdraw3d.apple.com/>
Since 3D graphing requires large amount of memory, we recommend that you assign at least 4 MB to pro Fit.
Installation
Once you have installed pro Fit 5.0, you must place the following files into one folder:
Plot3D
Text3DLib
Triangulate.Lib
(all these files are enclosed).
Then start pro Fit, choose "Load Module..." from the "Misc" menu and select Plot3D, or simply double-click the file Plot3D.
How to use it?
When you load Plot3D, it installs the following commands in the "Misc" menu:
- Plot3D_Data_XY
Plots data. The data's x-, y- and z-coordinates must be arranged in
three rows in a data window.
- Plot3D_Data_RowCol
Plots data. The data's x- and y- coordinates are the column and row
numbers of the data window, the z-coordinates the values in the data
window.
- Plot3D_Function
Plots a function.
Choose one of these commands to create a graph. The graph appears in a graph editing window. You can then use the Save and Edit menus to edit the graph. When you are through, click Done for placing a picture of the graph in a drawing window.
How do I compile it?
The sources of the module and a project file for CodeWarrior 9 are enclosed. Note that we also enclose new versions of the files ModuleUtilities.c and ModuleUtilites.h - these files replace the ones that came with pro Fit 5.0.0 and pro Fit 5.0t.
When compiling the project, you may have to add/correct Access Paths depending on where you have stored the various header files.
Customizing textures
This version of Plot3D allows you to apply a texture to the plotted surface instead of using a single color. There are various predefined textures that you can use. If you are familiar with ResEdit, you can also add your own textures: The textures are stored in Plot3D as resources of type PICT with IDs starting from 31000. You can paste your own PICT resources as textures. Note: the resource IDs of the texture PICTs must start from 31000 and there must be no gaps in the numbers. There can be up to 100 textures.
Known problems
The amount of memory required for plotting substantially depends on the number of points in your plot. When plotting around 10000 (e.g. 100 x 100) points, you should have at least 16 MB of free memory, for plotting 65000 points (e.g. 256 x 256 points), you need six times as much! When running out of memory, portions of memory are swapped out to disk, which drastically affects speed and system stability. Therefore, when working on large data sets, try to reduce the amount of data (e.g. by using the command "Data Reduction") before plotting.
Version history
Changes between 2.0.0 and 1.1.0
- 3D plots can now have ticks, labels and axis names. These items
can appear at each axis line and frame line.
- Surfaces can be textured.
- There's a new surface style: Basic. This style suppresses all shadowing
and ignores the position of the lights.
- You can now save and load the style of a graph - this provides a mechanism
for generating several graphs having the same settings for axes, labels,
camera, etc. The commands for loading, saving and deleting styles are
found in the File menu.
- All 3D plotting programs (for functions, xyz-data, Z(row,col)-data)
have been moved into a single module.
- Picture options are saved in automatically restored when you link the
module the next time.
- Bug fixes.
Changes between version 1.1.0 and version 1.0.0:
- Added the module "Plot3D Data Z(row,col)". This is a module
for 3D plotting of data. It takes a two-dimensional array
as input.
- Added a menu item "Camera & Illumination" for setting
the projection (parallel, point) and the location
of the illuminating lights.
- PICT Options now allows to set the depth of the PICTs
- PICT Options now allows to make a picture "transparent".
A transparent picture has the transfermode srcOr instead
of srcCopy
- The relative lengths of the axes can be set in the
Axes dialog.
- A frame (box) can be added by checking a checkbox in the axes
dialog.
- When creating a pict, the modules now first try to use temporary
memory before using the heap. This reduces the number of
messages "not enough memory"
- The main window shows the version number of the module at its